let amisLib = amisRequire('amis');
amisLib.addRule(
  'isPhone',
  (values, value) => {
    return /^1[\d]{10}$/.test(value);
  },
  '请输入手机号'
);
amisLib.addRule(
  'isIDNumber',
  (values, value) => {
    return /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value);
  },
  '请输入身份证号'
);
